package presenter.record;

import utils.FileBean;

import java.util.regex.Matcher;
import java.util.regex.Pattern;

public class HomeRecImpl implements IRecorder {
    @Override
    public Pattern pattern() {
        return Pattern.compile("(\\d+)_(\\d+)_(\\d+)_(\\d+)_(\\d+).mp4");
    }

    @Override
    public String rename(FileBean bean, Matcher matcher) {
        String start = matcher.group(4);
        String toName = String.format("%s.mp4", start);
        return IRecorder.fixedPath(bean.parent(), toName);
    }
}
